Computer programs can be modified or “patched” to replace at least some of the original code in the computer program with patched code. A computer program may be patched to add features, correct errors and/or improve the performance of the program.
Where a computer program is executing on a data processing system and at least a portion of the computer program is to be patched, or a portion of code that is called by the computer program is to be patched, the computer program is blocked from calling functions within the portion, even if not all of the functions within the portion need to be patched. This may lead to downtime of the computer program.
Another patching method loads patched code into a data processing systems memory, and modifies code within the function to be patched such that it calls the patched code instead of executes the original function code. However, once the patch is applied, the data processor may still be executing the unpatched code. Also, this patching method is memory inefficient as the original code is redundant but is still located within the memory.
It is an object of embodiments of the invention to at least mitigate one or more of the problems of the prior art.